﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="4-6.aspx.cs" Inherits="项目4._4_6" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="id" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="id" HeaderText="编号" ReadOnly="True" 
                SortExpression="id" />
            <asp:BoundField DataField="title" HeaderText="新闻标题" SortExpression="title" />
            <asp:BoundField DataField="createTime" HeaderText="发布时间" 
                SortExpression="createTime" />
            <asp:BoundField DataField="caId" HeaderText="新闻类别" SortExpression="caId" />
            <asp:HyperLinkField DataNavigateUrlFields="id" 
                DataNavigateUrlFormatString="4-6-1.aspx?id={0}" HeaderText="详细" Text="详细" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:systemConnectionString %>" 
        SelectCommand="SELECT [id], [title], [createTime], [caId] FROM [news]">
    </asp:SqlDataSource>
    <div>
    
    </div>
    </form>
</body>
</html>
